###############################################################################
# Makefile for XML sample C files
###############################################################################

# include common definitions
include ../Makefile.defs

PROGS=	XVMSample XVMXPathSample

# make all class files
all: $(PROGS)

XVMSample: XVMSample.c
	$(CC) -o XVMSample $(INCLUDE) $@.c $(LIB)

XVMXPathSample: XVMXPathSample.c
	$(CC) -o XVMXPathSample $(INCLUDE) $@.c $(LIB)

sure: $(PROGS)
	./XVMSample class.xml iden.xsl > XVMSample.out
	@if cmp -s XVMSample.out XVMSample.std; then echo PASS; else echo FAIL; fi
	./XVMXPathSample class.xml "/course/*" > XVMXPathSample.out
	@if cmp -s XVMXPathSample.out XVMXPathSample.std; then echo PASS; else echo FAIL; fi

clean:
	rm -f $(PROGS) *.o *.out

# end of Makefile
